@extends('admin::layouts.master')
@section('content')
    <div class="card" id="app">
        <div class="card-header">小程序回复管理</div>
        <ul role="tablist" class="nav nav-tabs">
            <li class="nav-item"><a href="/minicode/shouye" class="nav-link">小程序回复列表</a></li>
            <li class="nav-item"><a href="#" class="nav-link active">添加小程序回复</a></li>
        </ul>
        <form action="/minicode/shouye" method="post">
            <div class="card-body card-body-contrast">
                @csrf
                <div class="form-group row">
    <label for="title" class="col-12 col-sm-3 col-form-label text-md-right">标题</label>
    <div class="col-12 col-md-9">
        <input id="title" name="title" type="text"
               value="{{ $shouye['title']??old('title') }}"
               class="form-control form-control-sm form-control{{ $errors->has('title') ? ' is-invalid' : '' }}">
        @if ($errors->has('title'))
            <span class="invalid-feedback" role="alert">
                <strong>{{ $errors->first('title') }}</strong>
            </span>
        @endif
    </div>
</div>
<div class="form-group row">
    <label for="author" class="col-12 col-sm-3 col-form-label text-md-right">作者</label>
    <div class="col-12 col-md-9">
        <input id="author" name="author" type="text"
               value="{{ $shouye['author']??old('author') }}"
               class="form-control form-control-sm form-control{{ $errors->has('author') ? ' is-invalid' : '' }}">
        @if ($errors->has('author'))
            <span class="invalid-feedback" role="alert">
                <strong>{{ $errors->first('author') }}</strong>
            </span>
        @endif
    </div>
</div>
<div class="form-group row">
    <label for="content" class="col-12 col-sm-3 col-form-label text-md-right"  style="padding-top:initial;">内容</label>
    <div class="col-12 col-md-9">
        <textarea id="container" name="content" style="height:300px;width:100%;"></textarea>
    </div>
</div>

            </div>
            <div class="card-footer text-muted">
                <button class="btn btn-primary offset-sm-2">保存提交</button>
            </div>
        </form>
    </div>
@endsection

@section('script')

    <script>

        require(['hdjs'], function (hdjs) {
            hdjs.ueditor('container', {hash: 2, data: 'hd'}, function (editor) {
                console.log('编辑器执行后的回调方法1')
            });
        })

    </script>


    @endsection